package players;

public class SkillImpl extends Skill {
    private Position position;

    private int value;

    // ********************//
    // /*** Constructor ***//
    // ********************//
    public SkillImpl(final Position aPosition, final int value) {
        this.position = aPosition;
        this.value = value;
    }

    // Constructor vacio para el Hibernate.
    protected SkillImpl() {

    }

    // ****************************//
    // /*** Getters and Setters ***//
    // ****************************//
    @Override
    public Position getPosition() {
        return this.position;
    }

    public void setPosition(final Position position) {
        this.position = position;
    }

    @Override
    public int getValue() {
        return this.value;
    }

    public void setValue(final int value) {
        this.value = value;
    }

    // ****************//
    // /*** Methods ***//
    // ****************//
    /**
     * Retorna el valor si correspone a la posicion o 0 en caso contrario.
     */
    @Override
    public int getValue(final Position aPosition) {
        if (aPosition == this.position) {
            return this.value;
        }
        return 0;
    }

}
